<%@ page import="pojo.Student" %><%--
  Created by IntelliJ IDEA.
  User: konley
  Date: 2020/6/10
  Time: 21:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>信息修改 | 学生饭卡管理系统 </title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/bootstrap.css"/>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/css.css"/>
    <script src="${pageContext.request.contextPath }/js/bootstrap.js" type="text/javascript" charset="utf-8"></script>
    <script src="${pageContext.request.contextPath }/js/jquery-3.4.1.js" type="text/javascript"
            charset="utf-8"></script>
    <style type="text/css">
        body{
            background-image: url("photo/bg.jpg");
        }

    </style>
</head>
<body>
<!--top-->
<div style="background-color:#444;">
    <div class="container">
        <div class="row">
            <h2 style="color: white;font-weight: bold;" >校园一卡通系统 | 更新学生<span style="color: #FF6666;">更新</span></h2>
        </div>
    </div>
</div>
<% Student stu = (Student) request.getAttribute("student");%>
<div class="container">
    <div class="row">
        <div class="col-sm-6 col-sm-offset-3">
            <div class="panel panel-success " style="margin-top: 100px;">
                <div class="panel-heading">
                    <h1><strong>UPDATE</strong></h1>
                </div>
                <div class="panel-body">
                    <form name="reg" action="StudentServlet" method="post" class="form-horizontal" role="form">
                        <fieldset disabled>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">学号</label>
                                <div class="col-sm-8">
                                    <input name="id" class="form-control" type="text" value="<%=stu.getSid() %>"/>
                                </div>
                            </div>
                        </fieldset>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">密码</label>
                            <div class="col-sm-8">
                                <input name="password" class="form-control" type="password"
                                       value="<%=stu.getPassword() %>"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">姓名</label>
                            <div class="col-sm-8">
                                <input name="name" class="form-control" type="text" value="<%=stu.getName() %>"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">性别</label>
                            <div class="col-sm-8">
                                <input name="sex" class="form-control" type="text" value="<%=stu.getSex() %>"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">系别</label>
                            <div class="col-sm-8">
                                <input name="dept" class="form-control" type="text" value="<%=stu.getDept() %>"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">电话</label>
                            <div class="col-sm-8">
                                <input name="tel" class="form-control" type="text" value="<%=stu.getTel() %>"/>
                            </div>
                        </div>
                        <hr>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10" style="text-align: right">
                                <input name="m" type="hidden" value="update"/>
                                <input name="sid" type="hidden" value="<%=stu.getSid()%>"/>
                                <input style="margin-right: 22%" type="submit" value="更新我的信息并返回" id="bt" class="btn btn-success"/>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

</body>
</html>
